Skip to content

Fix 100+ CodeFactor issues in apps/lexfiat/client/src/#717

Merged
MightyPrytanis merged 12 commits intomainfrom
copilot/fix-codefactor-issues
Mar 27, 2026
Merged

Fix 100+ CodeFactor issues in apps/lexfiat/client/src/#717
MightyPrytanis merged 12 commits intomainfrom
copilot/fix-codefactor-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

  • Fix react/react-in-jsx-scope issues via ESLint config update
  • Fix accessibility issues (keyboard handlers, label associations) across all affected files
  • Fix maintainability issues (unused imports/vars, explicit anyunknown)
  • Fix hooks issues (set-state-in-effect) in notification-toast.tsx and header.tsx
  • Fix unescaped entities in citation-tools.tsx
  • Use ?? (nullish coalescing) instead of || for numeric metric fallbacks in workflow-pipeline.tsx so valid 0 values are preserved
Original prompt

Fix all Codefactor issues in MightyPrytanis/codebase that are not addressed by the open PR #714. PR #714 fixes style inconsistencies in ad-astra.css, dashboard-html.css, and a maintainability issue in email-processor.ts. The remaining issues are in various TypeScript and TSX files across the apps/lexfiat/client/src/ directory, including pages, components, and lib folders, covering accessibility, maintainability, style, complexity, and duplication problems. Ensure fixes do not introduce EBADPLATFORM npm errors on Ubuntu CI, as addressed in PR #715, by avoiding platform-specific dependencies or npm version issues.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: I have 100+ issues derived from problems identified by Codefactor. Is it possible to do a PR to address all of them?

Assistant: Yes, it is possible to create a single pull request that addresses multiple (or even all) of the Codefactor issues in your repository. For instance, there's already an open PR (#714) titled "Apply fixes from CodeFactor" that appears to apply automated fixes from Codefactor across multiple files and issues.

Based on the recent issues in the repository (limited to the most recent 30 results from the GitHub API), here's the list of open issues and pull requests. Note that the results may be incomplete due to API limits—view all issues at https://github.com/MightyPrytanis/codebase/issues.

data:
- url: "https://github.com/MightyPrytanis/codebase/pull/716"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "[WIP] Fix CI failure due to out of sync package.json and package-lock.json"
  number: 716
  created_at: "4 minutes ago"
  merged_at: ""
  labels: []
  author: "Copilot"
  comments: 0
  assignees_avatar_urls:
  - "https://avatars.githubusercontent.com/in/1143301?v=4"
  - "https://avatars.githubusercontent.com/u/219587333?v=4"
- url: "https://github.com/MightyPrytanis/codebase/pull/715"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Fix npm EBADPLATFORM on Ubuntu CI + add global CodeFactor guardrails"
  number: 715
  created_at: "34 minutes ago"
  merged_at: ""
  labels: []
  author: "Copilot"
  comments: 0
  assignees_avatar_urls:
  - "https://avatars.githubusercontent.com/in/1143301?v=4"
  - "https://avatars.githubusercontent.com/u/219587333?v=4"
- url: "https://github.com/MightyPrytanis/codebase/pull/714"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Apply fixes from CodeFactor"
  number: 714
  created_at: "38 minutes ago"
  merged_at: ""
  labels: []
  author: "codefactor-io[bot]"
  comments: 0
  assignees_avatar_urls:
  - "https://avatars.githubusercontent.com/in/1143301?v=4"
  - "https://avatars.githubusercontent.com/u/219587333?v=4"
data:
- url: "https://github.com/MightyPrytanis/codebase/issues/713"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Fix 15 Maintainability issues in packages\\shared\\types\\lexfiat-types.ts"
  number: 713
  created_at: "38 minutes ago"
  merged_at: ""
  labels: []
  author: "codefactor-io[bot]"
  comments: 0
  assignees_avatar_urls: []
- url: "https://github.com/MightyPrytanis/codebase/issues/712"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Fix 5 Accessibility, 5 Maintainability issues in apps\\lexfiat\\client\\src\\pages\\time-tracking.tsx"
  number: 712
  created_at: "40 minutes ago"
  merged_at: ""
  labels: []
  author: "codefactor-io[bot]"
  comments: 0
  assignees_avatar_urls: []
- url: "https://github.com/MightyPrytanis/codebase/issues/711"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Fix 7 Maintainability, 55 Style issues in apps\\lexfiat\\client\\src\\pages\\workflow-library.tsx"
  number: 711
  created_at: "40 minutes ago"
  merged_at: ""
  labels: []
  author: "codefactor-io[bot]"
  comments: 0
  assignees_avatar_urls: []
- url: "https://github.com/MightyPrytanis/codebase/issues/710"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Fix 7 Style issues in apps\\lexfiat\\client\\src\\pages\\not-found.tsx"
  number: 710
  created_at: "41 minutes ago"
  merged_at: ""
  labels: []
  author: "codefactor-io[bot]"
  comments: 0
  assignees_avatar_urls: []
- url: "https://github.com/MightyPrytanis/codebase/issues/709"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Fix 3 Accessibility, 3 Maintainability, 64 Style issues in apps\\lexfiat\\client\\src\\pages\\library.tsx"
  number: 709
  created_at: "41 minutes ago"
  merged_at: ""
  labels: []
  author: "codefactor-io[bot]"
  comments: 0
  assignees_avatar_urls: []
- url: "https://github.com/MightyPrytanis/codebase/issues/708"
  repository: "MightyPrytanis/codebase"
  state: "open"
  draft: false
  title: "Fix 2 Accessibility, 2 Maintainability, 2 Style issues in apps\\...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

Copilot AI and others added 2 commits March 23, 2026 13:03
Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MightyPrytanis/codebase/sessions/640dcf8a-c237-4ed7-8c9d-d01590758860
…exfiat TSX/TS files

Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MightyPrytanis/codebase/sessions/640dcf8a-c237-4ed7-8c9d-d01590758860
Copilot AI changed the title [WIP] Fix Codefactor issues in TypeScript and TSX files Fix 100+ CodeFactor issues in apps/lexfiat/client/src/ Mar 23, 2026
Copilot AI requested a review from MightyPrytanis March 23, 2026 13:51
@MightyPrytanis MightyPrytanis marked this pull request as ready for review March 25, 2026 02:13
Copilot AI review requested due to automatic review settings March 25, 2026 02:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce CodeFactor-reported issues in the LexFiat client by adjusting ESLint rules, improving JSX accessibility patterns, and tightening TypeScript types, alongside some dependency/lockfile updates in the repo.

Changes:

  • Disable react/react-in-jsx-scope in apps/lexfiat/client ESLint config to match the React 17+ JSX transform.
  • Improve accessibility by associating labels with controls and adding keyboard support to click-target <div> elements across multiple LexFiat pages/components.
  • Replace any with unknown/more specific types and remove unused imports/state in LexFiat client code.

Reviewed changes

Copilot reviewed 21 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
package.json Adds repo-root optionalDependencies for esbuild/platform binaries.
package-lock.json Regenerates/expands repo-root lockfile reflecting new optional deps.
apps/lexfiat/package.json Adds ESLint + TS-ESLint + jsx-a11y/react-hooks tooling deps for the LexFiat app.
apps/lexfiat/client/.eslintrc.json Turns off react/react-in-jsx-scope to eliminate React 19 JSX false positives.
apps/lexfiat/client/src/pages/workflow-library.tsx Removes unused imports/state; tightens Tabs value typing.
apps/lexfiat/client/src/pages/time-tracking.tsx Removes unused icons; replaces any with safer types; fixes label associations.
apps/lexfiat/client/src/pages/library.tsx Replaces any with unknown and adds htmlFor/id label wiring.
apps/lexfiat/client/src/pages/clio-integration.tsx Removes unused imports; replaces any with safer types; fixes label associations.
apps/lexfiat/client/src/pages/citation-tools.tsx Fixes label associations; replaces any; escapes quotes in JSX text.
apps/lexfiat/client/src/lib/demo-service.ts Removes unused imports; replaces any with unknown and narrows runtime usage via casts.
apps/lexfiat/client/src/components/ui/notification-toast.tsx Adjusts state-setting behavior inside useEffect.
apps/lexfiat/client/src/components/time-tracking/workflow-archaeology.tsx Replaces any with unknown; fixes error handling typing; label associations.
apps/lexfiat/client/src/components/library/upload-document-dialog.tsx Adds keyboard affordances and fixes label associations.
apps/lexfiat/client/src/components/library/library-list.tsx Adds keyboard affordances to clickable list items.
apps/lexfiat/client/src/components/library/library-detail-drawer.tsx Removes unused icon import; adds keyboard affordances to overlay.
apps/lexfiat/client/src/components/library/add-location-dialog.tsx Removes unused icons; replaces any with unknown; adds keyboard affordances + label associations.
apps/lexfiat/client/src/components/layout/header.tsx Removes unused icons/state; adds keyboard affordances; adjusts demoMode initialization logic.
apps/lexfiat/client/src/components/ethics/ethics-dashboard.tsx Removes unused imports; replaces any with unknown.
apps/lexfiat/client/src/components/dashboard/workflow-status-panels.tsx Removes unused imports; adds keyboard affordances to panels and rows.
apps/lexfiat/client/src/components/dashboard/workflow-stage-item.tsx Adds keyboard affordance to clickable/drag target container.
apps/lexfiat/client/src/components/dashboard/workflow-pipeline.tsx Replaces any with unknown; adjusts unused prop; adds numeric casts in metric fallbacks.
apps/lexfiat/client/src/components/dashboard/workflow-modules.tsx Removes unused icon import.
Cyrano/package-lock.json Updates lockfile entries (various version bumps) unrelated to LexFiat client fixes.
Files not reviewed (1)
  • Cyrano/package-lock.json: Language not supported

MightyPrytanis and others added 4 commits March 26, 2026 22:46
…log.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eline.tsx

Agent-Logs-Url: https://github.com/MightyPrytanis/codebase/sessions/f76be4c4-076d-436b-b288-6d4cae19fa2d

Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
…anels.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MightyPrytanis
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

@MightyPrytanis
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

@MightyPrytanis MightyPrytanis merged commit 2c0efab into main Mar 27, 2026
6 of 10 checks passed
@MightyPrytanis MightyPrytanis deleted the copilot/fix-codefactor-issues branch March 27, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants